package org.itboys.mobile.entity.mongo.dynamic;

import org.itboys.admin.dto.lasted.SundayUploadDto;
import org.itboys.mobile.entity.mongo.SundayComment;
import org.itboys.mobile.entity.mysql.product.SundayProduct;
import org.itboys.mongodb.entity.BaseMongoEntity;
import org.mongodb.morphia.annotations.Entity;

import java.util.List;

/**
 * 作者：jiangxiong
 * 日期：2017年4月26日
 * 联系方式 ：empty90911@126.com
 * 描述：圣代_移动端（通用）_动态_实体。如果属性不够，请自行填充
 */
@Entity(value="SundayDynamic", noClassnameStored=true)
public class SundayDynamic extends BaseMongoEntity{

    private Integer type;//类别:2-达人试用,3-本地爱购
    private Long memberId;//用户id
    private String memberName;//用户昵称
    private String memberImage;//用户昵称
    private String content;//动态内容
    //本地爱购字段
    private Long provinceId;//省ID
    private String provinceName;//省名称
    private Long cityId;// 城市ID
    private String cityName;//城市名称；
    private Integer dzNumber;//点赞数
    private Integer plNumber;//评论数量
    //dto需要字段
    //商品集合
    private List<SundayDynamicProduct> products;
    //评论集合
    private List<SundayDynamicOperate> comments;
    //图片集合
    private List<SundayUploadDto> images;
    //是否关注


    public SundayDynamic() {
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public String getMemberName() {
        return memberName;
    }

    public void setMemberName(String memberName) {
        this.memberName = memberName;
    }

    public String getMemberImage() {
        return memberImage;
    }

    public void setMemberImage(String memberImage) {
        this.memberImage = memberImage;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Long getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(Long provinceId) {
        this.provinceId = provinceId;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public Long getCityId() {
        return cityId;
    }

    public void setCityId(Long cityId) {
        this.cityId = cityId;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public Integer getDzNumber() {
        return dzNumber;
    }

    public void setDzNumber(Integer dzNumber) {
        this.dzNumber = dzNumber;
    }

    public Integer getPlNumber() {
        return plNumber;
    }

    public void setPlNumber(Integer plNumber) {
        this.plNumber = plNumber;
    }

    public List<SundayDynamicProduct> getProducts() {
        return products;
    }

    public void setProducts(List<SundayDynamicProduct> products) {
        this.products = products;
    }

    public List<SundayDynamicOperate> getComments() {
        return comments;
    }

    public void setComments(List<SundayDynamicOperate> comments) {
        this.comments = comments;
    }

    public List<SundayUploadDto> getImages() {
        return images;
    }

    public void setImages(List<SundayUploadDto> images) {
        this.images = images;
    }
    public String getTypeStr(){
        String typeStr= "";
        if(type==null)return typeStr;

        switch (type) {
            case 2:
                typeStr="达人试用";
                break;
            case 3:
                typeStr="爱购乐园";
                break;

            default:
                break;
        }
        return typeStr;
    }
}
